#!/bin/bash
git status
if [ $? -ne 0 ]
then
  cmd /k dir
fi
git add .
if [ $? -ne 0 ]
then
  cmd /k dir
fi
git status
if [ $? -ne 0 ]
then
  cmd /k dir
fi
echo -e "\n\033[32m ----------git add successful----------- \033[0m\n"
read -p "请输入提交信息:" a
git commit -m "$a" --no-verify
if [ $? -ne 0 ]
then
  cmd /k dir
fi
echo -e "\n\033[32m ----------commit successful----------- \033[0m\n"
git pull
if [ $? -ne 0 ]
then
  echo '拉取失败' 
  cmd /k dir
fi
echo -e "\n\033[32m ----------pull successful----------- \033[0m\n"
git push
if [ $? -ne 0 ]
then
  echo '推送失败' 
  cmd /k dir
fi
echo -e "\n\033[32m ----------提交成功！！----------- \033[0m\n"
cmd /k dir